home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / vgl20.zip / VGL.H < prev    next >
C/C++ Source or Header  |  1993-05-18  |  6KB  |  120 lines

  1. /*****************************************************************************
  2.  VGL.H
  3.  
  4.  Include this header file in any modules that use VGL routines.  Although
  5.  all VGL routines are prototyped here, you don't *have* to link in all the
  6.  VGL source files.  For example, the VGLKEY.C module will work even without
  7.  *any* other VGL modules linked.  VGLGIF.C doesn't require anything else
  8.  either.  VGLFONTS.C calls routines in VGL386.ASM and VGLLINE.C so if you
  9.  use fonts you'll have to link in these two modules as well.  Anyway, you'll
  10.  sort it all out.
  11.  
  12.  Mark
  13.  morley@camosun.bc.ca
  14. *****************************************************************************/
  15.  
  16. #define VGL_NUMKEYS    4                /* Set this to the number of keys   */
  17.                                         /* you wish to trap in the keyboard */
  18.                                         /* handling routines                */
  19.  
  20. extern char vglKeyStatus[VGL_NUMKEYS];  /* You can test if a given key is   */
  21.                                         /* being held down by testing if    */
  22.                                         /* its corresponding byte in this   */
  23.                                         /* array is 1 or 0 (1==down)        */
  24.  
  25. #define VGL_UPARROW        { 72, 200 }  /* Don't change any of these values */
  26. #define VGL_DOWNARROW      { 80, 208 }  /* unless they are different for    */
  27. #define VGL_LEFTARROW      { 75, 203 }  /* your particular keyboard (this   */
  28. #define VGL_RIGHTARROW     { 77, 205 }  /* is unlikely, I think).           */
  29. #define VGL_HOME           { 71, 199 }  /* The first number is the scan     */
  30. #define VGL_END            { 79, 207 }  /* code that is generated when the  */
  31. #define VGL_PAGEUP         { 73, 201 }  /* key is pressed, the second is    */
  32. #define VGL_PAGEDOWN       { 81, 209 }  /* the scan code generated when it  */
  33. #define VGL_KEYPAD5        { 76, 204 }  /* is released.                     */
  34. #define VGL_CONTROL        { 29, 157 }  /* Insert these values into the     */
  35. #define VGL_ALT            { 56, 184 }  /* list in the VGLKEY.C module as   */
  36. #define VGL_LEFTSHIFT      { 42, 170 }  /* required for your application.   */
  37. #define VGL_RIGHTSHIFT     { 54, 182 }
  38.  
  39. #define VIDMEM ((char far*)0xa0000000L) /* Handy for loading a GIF directly */
  40.                                         /* into video memory.               */
  41.  
  42. typedef struct                          /* Structure that defines a font.   */
  43. {
  44.    unsigned char first;                 /* First character in font          */
  45.    unsigned char last;                  /* Last character in font           */
  46.    unsigned char flags;                 /* Special flags (see below)        */
  47.    unsigned char wswid;                 /* White space width in pixels      */
  48.    unsigned char vspace;                /* Space between rows in pixels     */
  49.    unsigned char hspace;                /* Space between adjacent chars     */
  50.    unsigned char chwid[256];            /* Width of each character          */
  51.    unsigned char chhit[256];            /* Height of each character         */
  52.    signed   char chbas[256];            /* Baseline of each character       */
  53.    unsigned int  choff[256];            /* Offset of bitmap for each char   */
  54.    unsigned int  data;                  /* Size of the bitmap data in bytes */
  55. } VGLFONT;
  56.  
  57. #define FONT_UPPERCASE         1        /* One and only font flag (so far)  */
  58.                                         /* If set for a font, it means that */
  59.                                         /* lowercase characters will be     */
  60.                                         /* converted to uppercase before    */
  61.                                         /* processing.  DIGITAL is an       */
  62.                                         /* example of such a font.          */
  63.                                         /* Other possible values are        */
  64.                                         /* reserved!!!                      */
  65.  
  66. vglInit();
  67. vglTerm();
  68. vglBuffer( char far* buffer );
  69. vglClear( int c );
  70. vglClearL( int lines, int c );
  71. vglUpdate();
  72. vglUpdateW();
  73. vglUpdateL( int lines );
  74. vglUpdateLW( int lines );
  75. vglBox( int x, int y, int width, int height, int c );
  76. vglHLine( int y, int x, int width, int c );
  77. vglCopy( int x, int y, int width, int height );
  78. vglCopyW( int x, int y, int width, int height );
  79. vglPut( int x, int y, int width, int height, char far* buffer );
  80. vglPutSprite( int x, int y, int width, int height, char far* buffer );
  81. vglPutPel( int x, int y, int c );
  82. vglGetPel( int x, int y );
  83. vglSetPal( char far* palette );
  84. vglSetPartPal( int first, int num, char far* palette );
  85. vglBlack();
  86. vglFadeIn( char far* palette );
  87. vglFadeOut( char far* palette );
  88. vglPartFadeIn( int first, int num, char far* palette );
  89. vglPartFadeOut( int first, int num, char far* palette );
  90. vglPartCycleL( int first, int num, char far* palette );
  91. vglPartCycleR( int first, int num, char far* palette );
  92. vglLine( int x1, int y1, int x2, int y2, int c );
  93. vglGif( char* file, char far* buffer, char far* pal, int* width, int* height );
  94. vglBoldOff();
  95. vglBoldOn();
  96. vglGetX();
  97. vglGetY();
  98. vglGotoXY( int x, int y );
  99. vglItalicsOn();
  100. vglItalicsOff();
  101. vglLoadFont( char* font );
  102. vglPutc( int c );
  103. vglPuts( char* s );
  104. vglShadowColor( int c );
  105. vglShadowOff();
  106. vglShadowOn( int s );
  107. vglTextColor( int c );
  108. vglUnderlineColor( int c );
  109. vglUnderlineOn( int n );
  110. vglUnderlineOff();
  111. vglTrapKeys();
  112. vglReleaseKeys();
  113. vglMousePresent();
  114. vglInitMouse();
  115. vglShowMouse();
  116. vglHideMouse();
  117. vglHideMouseIf( int x1, int y1, int x2, int y2 );
  118. vglGetMouseStatus( int* x, int* y, int* b );
  119. vglPlayFLI( char* file, char far* buffer, int speed );
  120.